<?php
require_once './model/db.php';
require_once './model/partners.php';
require_once './model/myfunctions.php';
isset($_GET['s'])? $stt=$_GET['s']:$stt=1;
$fc= new MyFunctions();
$obj_partners= new Partners();
$partners= $obj_partners->select($params);
$total= count($partners);
$partners[$stt-1]&&is_int($stt*1)?'':$fc->redirectTo404();
?>
<div id="col" class="box">
    
        <div id="ribbon"></div> <!-- /ribbon (design/ribbon.gif) -->
        
        <!-- Screenshot in browser (replace tmp/browser.gif) -->
        <div id="col-browser"><a href="detail.php?type=pn&id=<?php echo $partners[0]['id'];?>"><img src="<?php echo PATH_PARTNERS_IMAGE.$partners[$stt-1]['thumb'];?>" width="255" height="177" alt=""></a></div> 
        
        <div id="col-text">

            <h2 id="slogan"><a href="detail.php?type=pn&id=<?php echo $partners[0]['id'];?>" style="text-decoration: none;"><?php echo $fc->charLimit($partners[$stt-1]['name'],50);?></a></h2>
            
            <p><?php echo $fc->charLimit($partners[$stt-1]['profile'],260);?></p>
            
            <p id="btns">
                <a href="index.php?s=<?php if($stt==1){echo $total;}else {echo $stt-1;};?>"><img src="<?php echo PATH_DESIGN_IMAGE;?>prev.png" alt=""></a>
                <a href="index.php?s=<?php if($stt==$total){echo 1;}else {echo $stt+1;}?>"><img src="<?php echo PATH_DESIGN_IMAGE;?>next.png" alt=""></a>
            </p>

        </div> <!-- /col-text -->
    
    </div>